package service.impl;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import bean.BaseBean;
import bean.LoginBean;
import service.ActionI;

/**
 * 登录处理类
 * @author dr
 *
 */
public class LoginAction implements  ActionI  {

	@Override
	public String execute(HttpServletRequest request, HttpServletResponse response, BaseBean form,
			Map<String, String> actionForward) {
		String result = "fail";
		LoginBean  entity = (LoginBean)form;
		if("admin".equals(entity.getUsername()) && "123456".equals(entity.getPassword())){
			result="success";
		}
		return actionForward.get(result);
		
	}

	

}
